package com.mt.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mt.VO.FilmScheduleInfoVO;
import com.mt.VO.SelectSeatVO;
import com.mt.pojo.CinemaHall;
import com.mt.pojo.CinemaSchedule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Wang
 * @since 2020-12-11
 */
@Mapper
public interface CinemaScheduleMapper extends BaseMapper<CinemaSchedule> {
    boolean batchInsert(@Param("list") List<CinemaSchedule> list);

    List<CinemaHall> getAvailableHall(@Param("scheduleDate") String scheduleDate, @Param("start") String start, @Param("end") String end, @Param("cinemaId") int cinemaId);

    List<CinemaSchedule> exitConflictSchedule(@Param("schedule") CinemaSchedule schedule);

    List<String> getScheduleDateList(@Param("cinemaId") int cinemaId, @Param("filmId") int filmId);

    FilmScheduleInfoVO getScheduleDetailInfo(@Param("scheduleId") int scheduleId);


    SelectSeatVO getScheduleSeatsDetail(@Param("scheduleId") int scheduleId);

    List<FilmScheduleInfoVO> getScheduleList(@Param("filmId") int filmId,
                                             @Param("cinemaId") int cinemaId,
                                             @Param("scheduleDate") String scheduleDate,
                                             @Param("startTime") String startTime);

    List<FilmScheduleInfoVO> pageScheduleByCinema(IPage<FilmScheduleInfoVO> page,
                                                  @Param("cinemaId") int cinemaId,
                                                  @Param("filmName") String filmName);


}
